package com.dongdongshop.RocketMQConsume;


import com.dongdongshop.service.FreemarkerService;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@RocketMQMessageListener(topic = "getSuccess",consumerGroup = "myconsumer-group")
public class RocketMQConsumer implements RocketMQListener<Long[]> {
    @Autowired
    private FreemarkerService freemarkerService;

    @Override
    public void onMessage(Long[] longs) {
        freemarkerService.createPage(longs);
    }
}
